<template>
  <div style="display: flex; justify-content: space-between; margin-bottom: 5px">
    <n-space>
      <n-button size="small" type="primary" @click="openAdd">
        <template #icon>
          <n-icon :component="AddCircleOutline"/>
        </template>
        新增
      </n-button>
    </n-space>

    <AddForm v-model:show="showAdd" @close="()=>{showAdd=false}" @get-list="()=>$emit('get-list')"
             title="新增字典"
    />
  </div>
</template>
<script name="DictToolbar" setup >
import {AddCircleOutline} from "@vicons/ionicons5";
import {NButton, NIcon, NSpace} from "naive-ui";
import {ref} from "vue";
import AddForm from "@/views/admin/sys/dict/toolbar/AddForm.vue";


const showAdd = ref(false);
const openAdd = ()=>{
  // 打开新增菜单页面
  showAdd.value = true
}
</script>
